/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    min-height: 100vh;
}

/* 容器布局 */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header-content h1 {
    color: #333;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    margin-top: 64px; /* header的高度 */
    flex: 1;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    position: fixed;
    height: calc(100vh - 64px);
    padding: 1rem 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: #4CAF50;
    color: white;
}

/* 内容区域 */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background-color: #f4f6f9;
    min-height: calc(100vh - 64px);
}

.content-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
}

.content-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #45a049;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-btn {
    background-color: #4CAF50;
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 表格样式 */
.patients-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.patients-table th,
.patients-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.patients-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 信息卡片样式 */
.info-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.info-item {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.info-item label {
    min-width: 120px;
    font-weight: 600;
    color: #495057;
}

.info-item span {
    color: #333;
    flex: 1;
}

/* 病房网格样式 */
.ward-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar a span {
        display: none;
    }
    
    .content {
        margin-left: 60px;
    }
    
    .header-content h1 {
        font-size: 1.2rem;
    }
} 

.edit-form {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.edit-form h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.info-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* 按钮基础样式 */
.edit-btn, .save-btn, .cancel-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

/* 编辑按钮 */
.edit-btn {
    background: linear-gradient(135deg, #4CAF50, #43A047);
    color: white;
    min-width: 140px;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #43A047, #388E3C);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
    transform: translateY(-2px);
}

.edit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

/* 保存按钮 */
.save-btn {
    background: linear-gradient(135deg, #1E88E5, #1976D2);
    color: white;
    min-width: 120px;
    margin-right: 1rem;
}

.save-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.25);
    transform: translateY(-2px);
}

.save-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

/* 取消按钮 */
.cancel-btn {
    background: linear-gradient(135deg, #90A4AE, #78909C);
    color: white;
    min-width: 120px;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #78909C, #607D8B);
    box-shadow: 0 4px 12px rgba(120, 144, 156, 0.25);
    transform: translateY(-2px);
}

.cancel-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(120, 144, 156, 0.2);
}

/* 按钮禁用状态 */
.edit-btn:disabled,
.save-btn:disabled,
.cancel-btn:disabled {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    color: #757575;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* 按钮图标样式 */
.edit-btn i,
.save-btn i,
.cancel-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

/* 按钮悬浮时图标效果 */
.edit-btn:hover i,
.save-btn:hover i,
.cancel-btn:hover i {
    transform: scale(1.1);
}

/* 按钮容器样式 */
.info-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-end;
}

.form-buttons {
    margin-top: 2.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1.2rem;
}

/* 波纹效果 */
.edit-btn::after,
.save-btn::after,
.cancel-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.edit-btn:active::after,
.save-btn:active::after,
.cancel-btn:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
} 

/* 病房状态表格样式 */
.ward-filters {
    margin-bottom: 20px;
}

.ward-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.view-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}
.view-link:hover {
    text-decoration: underline;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-wrapper {
    background: white;
    padding: 20px;
    border-radius: 5px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
}

.modal-content {
    margin-bottom: 20px;
}

.modal-close {
    display: block;
    margin: 0 auto;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-close:hover {
    background: #0056b3;
}